#include <bits/stdc++.h>
using namespace std;
#define N 100050
int n,r,b[N];
long long last;
int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    ios::sync_with_stdio(false);
    cin.tie(0);
    cin>>n;
    for(int i=1;i<=n;i++)
    {
        cin>>r;
        b[r]++;
    }
    for(int i=1;i<=N-10;i++)
    {
        if(b[i]==0) continue;
        if(b[i]>=last) last=0;
        else last-=b[i];
        last+=b[i];
    }
    cout<<last;
    return 0;
}
